package cn.alpha.shequ.dao;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.RowBounds;

/**
 * 
 * @author chenl 2012-8-13
 * @param <T>
 */
public interface BaseMapper<T> {

    /**
     * 
     * @param entity
     * @return
     */
    public int saveEntity(T entity);

    /**
     * 
     * @param entity
     * @return
     */
    public int updateEntity(T entity);

    /**
     * 
     * @return
     */
    public T findByPK(Serializable entityId);

    /**
     * 
     * @return
     */
    public Integer findCountByCriteria(Map<String, Object> param);

    /**
     * 
     * @param bounds
     * @return
     */
    public List<T> findPageListByCriteria(Map<String, Object> param, RowBounds bounds);
    
    public List<T> findListByCriteria(Map<String, Object> param);

    /**
     * 
     * @param ids
     * @return
     */
    public int deleteByPKArray(Serializable[] ids);
    
    public int deleteByPK(Serializable id);
}


/**
    public int saveEntity(T entity);
    public int updateEntity(T entity);
    public T findByPK(Serializable entityId);
    public int findCountByCriteria(Map<String, Object> param);
    public List<T> findPageListByCriteria(Map<String, Object> para, RowBounds bounds);
    public List<T> findListByCriteria(Map<String, Object> param);
    public int deleteByPKArray(Serializable[] ids);
    public int deleteByPK(Serializable id);
}*/
